<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div id="app">
			<p>currentTime1 {{currentTime1()}}</p>
			<p>currentTime2 {{currentTime2}}</p>
		</div>
		
		<script src='https://cdn.jsdelivr.net/npm/vue@2.5.21/dist/vue.min.js'></script>
		<script>
			var vm = new Vue({
				el: "#app",
				
				data: {
					message: "hi"
				},
				methods: {
					currentTime1: function () {
						return Date.now();//返回一个时间戳
					}
				},
				computed: {
					currentTime2: function () {//计算属性
					this.message;
						return Date.now();//返回一个时间戳
					}
				}
			});
		</script>
		
	</body>
</html>
